/**
 * EmptyState Component
 * 
 * Unified empty state display for various scenarios
 */

import { LucideIcon } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { cn } from '@/lib/utils';

export interface EmptyStateProps {
  icon: LucideIcon;
  title: string;
  description: string;
  action?: {
    label: string;
    onClick: () => void;
  };
  className?: string;
}

export function EmptyState({
  icon: Icon,
  title,
  description,
  action,
  className,
}: EmptyStateProps) {
  return (
    <div className={cn(
      'flex flex-col items-center justify-center p-12 text-center',
      className
    )}>
      {/* Icon */}
      <div className="mb-4 p-4 rounded-full bg-muted/30 ring-1 ring-border/50">
        <Icon className="w-12 h-12 text-muted-foreground/50" />
      </div>

      {/* Title */}
      <h3 className="text-lg font-semibold mb-2 text-foreground">
        {title}
      </h3>

      {/* Description */}
      <p className="text-sm text-muted-foreground mb-6 max-w-sm leading-relaxed">
        {description}
      </p>

      {/* Action Button */}
      {action && (
        <Button 
          onClick={action.onClick}
          className="shadow-sm"
        >
          {action.label}
        </Button>
      )}
    </div>
  );
}

